#ifndef PLAYER_H
#define PLAYER_H
#include "../core/actor.h"
#include "../affiliate/spriteAnima.h"
#include "../world/effect.h"
#include "../stats/weaponLightning.h"
class timer;
class player : public actor
{
private:
    effect* deathEffect_ = nullptr;
    spriteAnima* idle_ = nullptr;
    spriteAnima* move_  = nullptr;
    weapon* weapon_ = nullptr;
    timer* flashTimer = nullptr;
    bool isMoving_ = false;
public:
    virtual void init() override;
    virtual void clean() override;
    virtual void render() override;
    virtual void update(float dt) override;
    virtual bool handleEvents(SDL_Event& event) override;
    void keyboardInput();
    void syncCamera();
    void checkState();
    void changeState(bool isMoving);
    void checkIsDead();
    virtual void takeDamage(float damage) override;
};
#endif